package com.sxyjhh.dbutil.utils;

/**
 * Description：常量配置类
 *
 * @JDK Version:1.8.0_40
 * Version: V1.0
 * Author: wangchun
 * Date: 2016/3/22 13:30
 */
public class DBConstConfig {

    public interface DBName {
        String MYSQL = "mysql";
        String ORACLE = "oracle";
        String SQL_SERVER = "sqlserver";
    }

    public interface DBDriver {
        String ORACLE_DRIVER = "oracle.jdbc.driver.OracleDriver";
        String MYSQL_DRIVER = "com.mysql.jdbc.Driver";
        String SQL_SERVER_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
        String DM_DRIVER = "dm.jdbc.driver.DmDriver";
    }

    public interface DBUrlFormat {
//        String ORACLE_URL = "jdbc:oracle:thin:@{host}:{port}:{dbname}";
        String ORACLE_URL = "jdbc:oracle:thin:@//{host}:{port}/{dbname}";
        String MYSQL_URL = "jdbc:mysql://{host}:{port}/{dbname}?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useInformationSchema=true";   //&connectTimeout=10000&socketTimeout=10000
        String SQL_SERVER_URL = "jdbc:sqlserver://{host}:{port};databaseName={dbname}";  //;loginTimeout=10;socketTimeout=10
        String DM_URL = "jdbc:dm://{host}:{port}/{dbname}";
    }

    public interface DDConfigPropertiesKey {
        String QUERY_NUM_PER_PAGE = "db.query.numPerPage";
        String QUERY_THREAD_NUM = "db.query.numThread";
        String POOL_INITIAL_SIZE = "db.query.PoolInitialSize";

        String SAVE_THREAD_NUM = "db.save.numThread";

        String INFO_DB_IP = "db.info.dbIP";
        String INFO_DB_PORT = "db.info.dbPort";
        String INFO_DB_NAME = "db.info.dbName";
        String INFO_DB_USER_NAME = "db.info.userName";
        String INFO_DB_PASSWD = "db.info.passwd";
    }

    public interface DDConfigFileName {
        String DB_CONFIG = "db_config.properties";
    }

    public interface QueryRecordColumnName {
        String DB_NAME = "db_name";
        String TABLE_NAME = "table_name";
        String TABLE_ID = "table_id";
        String CREATE_TIME = "create_time";
        String UPDATE_TIME = "update_time";
        String STATUS = "status";
    }

}
